<template>
	<view class="top">
		<!-- <image v-if="!!topUrl" class="logo-bar" :src="topUrl" mode=""></image> -->
		<view class="top-bg">
			<image :src="bgUrl" mode="widthFix"></image>
		</view>
	</view>
</template>

<script>
	export default {
		name: "top-bar",
		data() {
			return {
				topUrl: this.$resource.topUrl,
				bgUrl: this.$resource.bgUrl,
			};
		},
		mounted() {
			uni.$once('site-init', () => {
				this.topUrl = this.$resource.topUrl;
				this.bgUrl = this.$resource.bgUrl;
			})
		}
	}
</script>

<style>
	.logo-bar {
		margin: 20rpx 0 0 100rpx;
		width: 220rpx;
		height: 100rpx;
	}

	.top-bg {
		width: 100vw;
		/* height: 340rpx; */
		z-index: 10;
	}
	.top-bg image {
		width: 100%;
	}
</style>